//
//  OrderFileCellTableViewCell.swift
//  ExpressDriver
//
//  Created by sheng on 2017/11/14.
//  Copyright © 2017年 sheng. All rights reserved.
//

import UIKit
import SnapKit

class OrderFileCellTableViewCell: UITableViewCell {
    
    
    @IBOutlet weak var fileImage: UIImageView!
    
    @IBOutlet weak var fileInfoLabel: UILabel!
    
    @IBOutlet weak var removeBtn: UIButton!

    @IBOutlet weak var uploadBtn: UIButton!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        setUI()
    }
    
    
    func setUI() {
        fileImage?.layer.borderColor = UIColor.gray.cgColor
        fileImage?.layer.borderWidth = 1.0
        fileImage.snp.makeConstraints { (make) in
            make.left.equalTo(10)
            make.width.equalTo(40)
            make.height.equalTo(40)
            make.centerY.equalTo(self)
        }
        
        fileInfoLabel.snp.makeConstraints { (make) in
            make.left.equalTo(fileImage.snp.right).offset(10)
            make.right.equalTo(removeBtn.snp.left).offset(-10)
            make.centerY.equalTo(self)
        }
        
        removeBtn?.layer.borderColor = UIColor.gray.cgColor
        removeBtn?.layer.borderWidth = 1.0
        removeBtn?.layer.cornerRadius = 3
        removeBtn.snp.makeConstraints { (make) in
            make.top.equalTo(10)
            make.right.equalTo(-10)
            make.width.equalTo(60)
            make.height.equalTo(20)
        }
        
        uploadBtn?.layer.borderColor = UIColor.gray.cgColor
        uploadBtn?.layer.borderWidth = 1.0
        uploadBtn?.layer.cornerRadius = 3
        uploadBtn.snp.makeConstraints { (make) in
            make.top.equalTo(removeBtn.snp.bottom).offset(5)
            make.right.equalTo(-10)
            make.bottom.equalTo(-10)
            make.width.equalTo(60)
            make.height.equalTo(20)
        }
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
